<template>
    <p>子组件</p>
    <p>props中的foo {{ foo }}</p>
    <p>props中的age {{ age }}</p>
</template>

<script>
export default {
    props: {
        foo: {
            type: String
        },
        age: {
            type: Number
        }

    },
    setup(props) {
        console.log(props);
        console.log('props.foo', props.foo);
        console.log('props.age', props.age);

    }
}
</script>